package generalObjects;

import java.io.Serializable;

/**
 * Container class that holds information about a member in a group. This
 * includes the sequence number for the member which is a count of how many
 * messages the member has sent to the group. In addition it contains the Java
 * RMI stub used by other members to send messages to this member.
 * 
 */
public class ClientInfo implements Serializable {

    private static final long serialVersionUID = 7697716717093458820L;
    private int sequenceNr;
    private BaseClientContract clientStub;

    public ClientInfo(final int sequenceNr, final BaseClientContract clientStub) {
        this.sequenceNr = sequenceNr;
        this.clientStub = clientStub;
    }

    public void incrementSeq() {
        sequenceNr++;
    }

    public void setSequenceNr(final int seq) {
        sequenceNr = seq;
    }

    public int getSequenceNr() {
        return sequenceNr;
    }

    public BaseClientContract getClientStub() {
        return clientStub;
    }

    public void setClientStub(final BaseClientContract clientStub) {
        this.clientStub = clientStub;
    }

}
